package com.leadbank.bigdata.redis;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import redis.clients.jedis.JedisPubSub;

/**
 * Created by roman on 16/1/12.
 */
public class DefaultJedisPubSubListener extends JedisPubSub {

    private final Logger LOG = LoggerFactory.getLogger(DefaultJedisPubSubListener.class);

    @Override
    public void onMessage(String channel, String message) {
        LOG.info("channel:{},message:{}", channel, message);
        RedisSubCache.LOCAL_CACHE.put(channel, message);
    }

}
